3.2.85 \(\int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx\) [185]

3.2.85.1 Optimal result
3.2.85.2 Mathematica [A] (verified)
3.2.85.3 Rubi [A] (verified)
3.2.85.4 Maple [A] (verified)
3.2.85.5 Fricas [A] (verification not implemented)
3.2.85.6 Sympy [F]
3.2.85.7 Maxima [A] (verification not implemented)
3.2.85.8 Giac [B] (verification not implemented)
3.2.85.9 Mupad [B] (verification not implemented)

3.2.85.1 Optimal result

Integrand size = 29, antiderivative size = 236 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \text {arctanh}(\sin (e+f x))}{8 f}+\frac {a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \tan (e+f x)}{30 f}+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \sec (e+f x) \tan (e+f x)}{120 f}+\frac {a \left (12 c^2+35 c d+16 d^2\right ) (c+d \sec (e+f x))^2 \tan (e+f x)}{60 f}+\frac {a (4 c+5 d) (c+d \sec (e+f x))^3 \tan (e+f x)}{20 f}+\frac {a (c+d \sec (e+f x))^4 \tan (e+f x)}{5 f} \]

output
1/8*a*(8*c^4+16*c^3*d+24*c^2*d^2+12*c*d^3+3*d^4)*arctanh(sin(f*x+e))/f+1/3 
0*a*(12*c^4+95*c^3*d+112*c^2*d^2+80*c*d^3+16*d^4)*tan(f*x+e)/f+1/120*a*d*( 
24*c^3+130*c^2*d+116*c*d^2+45*d^3)*sec(f*x+e)*tan(f*x+e)/f+1/60*a*(12*c^2+ 
35*c*d+16*d^2)*(c+d*sec(f*x+e))^2*tan(f*x+e)/f+1/20*a*(4*c+5*d)*(c+d*sec(f 
*x+e))^3*tan(f*x+e)/f+1/5*a*(c+d*sec(f*x+e))^4*tan(f*x+e)/f
 
3.2.85.2 Mathematica [A] (verified)

Time = 1.80 (sec) , antiderivative size = 153, normalized size of antiderivative = 0.65 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {a \left (15 \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \text {arctanh}(\sin (e+f x))+\tan (e+f x) \left (120 (c+d)^4+15 d \left (16 c^3+24 c^2 d+12 c d^2+3 d^3\right ) \sec (e+f x)+30 d^3 (4 c+d) \sec ^3(e+f x)+80 d^2 \left (3 c^2+2 c d+d^2\right ) \tan ^2(e+f x)+24 d^4 \tan ^4(e+f x)\right )\right )}{120 f} \]

input
Integrate[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c + d*Sec[e + f*x])^4,x]
 
output
(a*(15*(8*c^4 + 16*c^3*d + 24*c^2*d^2 + 12*c*d^3 + 3*d^4)*ArcTanh[Sin[e + 
f*x]] + Tan[e + f*x]*(120*(c + d)^4 + 15*d*(16*c^3 + 24*c^2*d + 12*c*d^2 + 
 3*d^3)*Sec[e + f*x] + 30*d^3*(4*c + d)*Sec[e + f*x]^3 + 80*d^2*(3*c^2 + 2 
*c*d + d^2)*Tan[e + f*x]^2 + 24*d^4*Tan[e + f*x]^4)))/(120*f)
 
3.2.85.3 Rubi [A] (verified)

Time = 1.40 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.07, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.483, Rules used = {3042, 4490, 3042, 4490, 3042, 4490, 3042, 4485, 3042, 4274, 3042, 4254, 24, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \sec (e+f x) (a \sec (e+f x)+a) (c+d \sec (e+f x))^4 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^4dx\)

\(\Big \downarrow \) 4490

\(\displaystyle \frac {1}{5} \int \sec (e+f x) (c+d \sec (e+f x))^3 (a (5 c+4 d)+a (4 c+5 d) \sec (e+f x))dx+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^3 \left (a (5 c+4 d)+a (4 c+5 d) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4490

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int \sec (e+f x) (c+d \sec (e+f x))^2 \left (a \left (20 c^2+28 d c+15 d^2\right )+a \left (12 c^2+35 d c+16 d^2\right ) \sec (e+f x)\right )dx+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2 \left (a \left (20 c^2+28 d c+15 d^2\right )+a \left (12 c^2+35 d c+16 d^2\right ) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4490

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \int \sec (e+f x) (c+d \sec (e+f x)) \left (a \left (60 c^3+108 d c^2+115 d^2 c+32 d^3\right )+a \left (24 c^3+130 d c^2+116 d^2 c+45 d^3\right ) \sec (e+f x)\right )dx+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right ) \left (a \left (60 c^3+108 d c^2+115 d^2 c+32 d^3\right )+a \left (24 c^3+130 d c^2+116 d^2 c+45 d^3\right ) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4485

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \sec (e+f x) \left (15 a \left (8 c^4+16 d c^3+24 d^2 c^2+12 d^3 c+3 d^4\right )+4 a \left (12 c^4+95 d c^3+112 d^2 c^2+80 d^3 c+16 d^4\right ) \sec (e+f x)\right )dx+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \int \csc \left (e+f x+\frac {\pi }{2}\right ) \left (15 a \left (8 c^4+16 d c^3+24 d^2 c^2+12 d^3 c+3 d^4\right )+4 a \left (12 c^4+95 d c^3+112 d^2 c^2+80 d^3 c+16 d^4\right ) \csc \left (e+f x+\frac {\pi }{2}\right )\right )dx+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4274

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (4 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \int \sec ^2(e+f x)dx+15 a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \int \sec (e+f x)dx\right )+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (15 a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \int \csc \left (e+f x+\frac {\pi }{2}\right )dx+4 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \int \csc \left (e+f x+\frac {\pi }{2}\right )^2dx\right )+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (15 a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \int \csc \left (e+f x+\frac {\pi }{2}\right )dx-\frac {4 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \int 1d(-\tan (e+f x))}{f}\right )+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (15 a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \int \csc \left (e+f x+\frac {\pi }{2}\right )dx+\frac {4 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \tan (e+f x)}{f}\right )+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (\frac {1}{2} \left (\frac {15 a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) \text {arctanh}(\sin (e+f x))}{f}+\frac {4 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \tan (e+f x)}{f}\right )+\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \tan (e+f x) \sec (e+f x)}{2 f}\right )+\frac {a \left (12 c^2+35 c d+16 d^2\right ) \tan (e+f x) (c+d \sec (e+f x))^2}{3 f}\right )+\frac {a (4 c+5 d) \tan (e+f x) (c+d \sec (e+f x))^3}{4 f}\right )+\frac {a \tan (e+f x) (c+d \sec (e+f x))^4}{5 f}\)

input
Int[Sec[e + f*x]*(a + a*Sec[e + f*x])*(c + d*Sec[e + f*x])^4,x]
 
output
(a*(c + d*Sec[e + f*x])^4*Tan[e + f*x])/(5*f) + ((a*(4*c + 5*d)*(c + d*Sec 
[e + f*x])^3*Tan[e + f*x])/(4*f) + ((a*(12*c^2 + 35*c*d + 16*d^2)*(c + d*S 
ec[e + f*x])^2*Tan[e + f*x])/(3*f) + ((a*d*(24*c^3 + 130*c^2*d + 116*c*d^2 
 + 45*d^3)*Sec[e + f*x]*Tan[e + f*x])/(2*f) + ((15*a*(8*c^4 + 16*c^3*d + 2 
4*c^2*d^2 + 12*c*d^3 + 3*d^4)*ArcTanh[Sin[e + f*x]])/f + (4*a*(12*c^4 + 95 
*c^3*d + 112*c^2*d^2 + 80*c*d^3 + 16*d^4)*Tan[e + f*x])/f)/2)/3)/4)/5
 

3.2.85.3.1 Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 

rule 4274
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_)), x_Symbol] :> Simp[a   Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d   In 
t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
 

rule 4485
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + 
(a_))*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-b)*B*Cot[ 
e + f*x]*((d*Csc[e + f*x])^n/(f*(n + 1))), x] + Simp[1/(n + 1)   Int[(d*Csc 
[e + f*x])^n*Simp[A*a*(n + 1) + B*b*n + (A*b + B*a)*(n + 1)*Csc[e + f*x], x 
], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] &&  !LeQ[ 
n, -1]
 

rule 4490
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs 
c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-B)*Cot[e + f*x]*(( 
a + b*Csc[e + f*x])^m/(f*(m + 1))), x] + Simp[1/(m + 1)   Int[Csc[e + f*x]* 
(a + b*Csc[e + f*x])^(m - 1)*Simp[b*B*m + a*A*(m + 1) + (a*B*m + A*b*(m + 1 
))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, A, B, e, f}, x] && NeQ[A*b - a* 
B, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0]
 
3.2.85.4 Maple [A] (verified)

Time = 5.16 (sec) , antiderivative size = 237, normalized size of antiderivative = 1.00

method result size
parts \(\frac {\left (4 a c \,d^{3}+a \,d^{4}\right ) \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}-\frac {\left (6 a \,c^{2} d^{2}+4 a c \,d^{3}\right ) \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )}{f}+\frac {\left (4 a \,c^{3} d +6 a \,c^{2} d^{2}\right ) \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )}{f}+\frac {\left (a \,c^{4}+4 a \,c^{3} d \right ) \tan \left (f x +e \right )}{f}+\frac {a \,c^{4} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{f}-\frac {a \,d^{4} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )}{f}\) \(237\)
derivativedivides \(\frac {a \,c^{4} \tan \left (f x +e \right )+4 a \,c^{3} d \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-6 a \,c^{2} d^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+4 a c \,d^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a \,d^{4} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+a \,c^{4} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+4 a \,c^{3} d \tan \left (f x +e \right )+6 a \,c^{2} d^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-4 a c \,d^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+a \,d^{4} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}\) \(313\)
default \(\frac {a \,c^{4} \tan \left (f x +e \right )+4 a \,c^{3} d \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-6 a \,c^{2} d^{2} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+4 a c \,d^{3} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )-a \,d^{4} \left (-\frac {8}{15}-\frac {\sec \left (f x +e \right )^{4}}{5}-\frac {4 \sec \left (f x +e \right )^{2}}{15}\right ) \tan \left (f x +e \right )+a \,c^{4} \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )+4 a \,c^{3} d \tan \left (f x +e \right )+6 a \,c^{2} d^{2} \left (\frac {\sec \left (f x +e \right ) \tan \left (f x +e \right )}{2}+\frac {\ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{2}\right )-4 a c \,d^{3} \left (-\frac {2}{3}-\frac {\sec \left (f x +e \right )^{2}}{3}\right ) \tan \left (f x +e \right )+a \,d^{4} \left (-\left (-\frac {\sec \left (f x +e \right )^{3}}{4}-\frac {3 \sec \left (f x +e \right )}{8}\right ) \tan \left (f x +e \right )+\frac {3 \ln \left (\sec \left (f x +e \right )+\tan \left (f x +e \right )\right )}{8}\right )}{f}\) \(313\)
norman \(\frac {-\frac {a \left (8 c^{4}+16 c^{3} d +24 c^{2} d^{2}+12 c \,d^{3}+3 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{4 f}-\frac {a \left (8 c^{4}+48 c^{3} d +72 c^{2} d^{2}+52 c \,d^{3}+13 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}-\frac {4 a \left (45 c^{4}+180 c^{3} d +150 c^{2} d^{2}+100 c \,d^{3}+29 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{15 f}+\frac {a \left (48 c^{4}+144 c^{3} d +120 c^{2} d^{2}+116 c \,d^{3}+13 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{6 f}+\frac {a \left (48 c^{4}+240 c^{3} d +264 c^{2} d^{2}+140 c \,d^{3}+19 d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{6 f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{5}}-\frac {a \left (8 c^{4}+16 c^{3} d +24 c^{2} d^{2}+12 c \,d^{3}+3 d^{4}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{8 f}+\frac {a \left (8 c^{4}+16 c^{3} d +24 c^{2} d^{2}+12 c \,d^{3}+3 d^{4}\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{8 f}\) \(355\)
parallelrisch \(\frac {2 a \left (-5 \left (2 c^{3} d +3 c^{2} d^{2}+\frac {3}{2} c \,d^{3}+\frac {3}{8} d^{4}+c^{4}\right ) \left (\frac {\cos \left (5 f x +5 e \right )}{10}+\frac {\cos \left (3 f x +3 e \right )}{2}+\cos \left (f x +e \right )\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )+5 \left (2 c^{3} d +3 c^{2} d^{2}+\frac {3}{2} c \,d^{3}+\frac {3}{8} d^{4}+c^{4}\right ) \left (\frac {\cos \left (5 f x +5 e \right )}{10}+\frac {\cos \left (3 f x +3 e \right )}{2}+\cos \left (f x +e \right )\right ) \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+\left (10 c^{2} d^{2}+\frac {20}{3} c \,d^{3}+6 c^{3} d +\frac {4}{3} d^{4}+\frac {3}{2} c^{4}\right ) \sin \left (3 f x +3 e \right )+\left (2 c^{2} d^{2}+\frac {4}{3} c \,d^{3}+2 c^{3} d +\frac {4}{15} d^{4}+\frac {1}{2} c^{4}\right ) \sin \left (5 f x +5 e \right )+\left (7 c \,d^{3}+6 c^{2} d^{2}+4 c^{3} d +\frac {7}{4} d^{4}\right ) \sin \left (2 f x +2 e \right )+\left (\frac {3}{2} c \,d^{3}+3 c^{2} d^{2}+2 c^{3} d +\frac {3}{8} d^{4}\right ) \sin \left (4 f x +4 e \right )+\sin \left (f x +e \right ) \left (4 c^{3} d +8 c^{2} d^{2}+\frac {16}{3} c \,d^{3}+\frac {8}{3} d^{4}+c^{4}\right )\right )}{f \left (\cos \left (5 f x +5 e \right )+5 \cos \left (3 f x +3 e \right )+10 \cos \left (f x +e \right )\right )}\) \(373\)
risch \(\frac {i a \left (64 d^{4}+120 c^{4}-720 c^{2} d^{2} {\mathrm e}^{7 i \left (f x +e \right )}+960 c \,d^{3} {\mathrm e}^{6 i \left (f x +e \right )}+2880 c^{3} d \,{\mathrm e}^{4 i \left (f x +e \right )}-180 c \,d^{3} {\mathrm e}^{9 i \left (f x +e \right )}+480 c^{3} d \,{\mathrm e}^{8 i \left (f x +e \right )}+1440 c^{2} d^{2} {\mathrm e}^{6 i \left (f x +e \right )}+1600 c \,d^{3} {\mathrm e}^{2 i \left (f x +e \right )}-840 c \,d^{3} {\mathrm e}^{7 i \left (f x +e \right )}+1920 c^{3} d \,{\mathrm e}^{6 i \left (f x +e \right )}+720 c^{2} d^{2} {\mathrm e}^{3 i \left (f x +e \right )}+840 c \,d^{3} {\mathrm e}^{3 i \left (f x +e \right )}+1920 c^{3} d \,{\mathrm e}^{2 i \left (f x +e \right )}-240 c^{3} d \,{\mathrm e}^{9 i \left (f x +e \right )}-480 c^{3} d \,{\mathrm e}^{7 i \left (f x +e \right )}-360 c^{2} d^{2} {\mathrm e}^{9 i \left (f x +e \right )}+240 c^{3} d \,{\mathrm e}^{i \left (f x +e \right )}+360 c^{2} d^{2} {\mathrm e}^{i \left (f x +e \right )}+180 c \,d^{3} {\mathrm e}^{i \left (f x +e \right )}+3360 c^{2} d^{2} {\mathrm e}^{4 i \left (f x +e \right )}+2240 c \,d^{3} {\mathrm e}^{4 i \left (f x +e \right )}+480 c^{3} d \,{\mathrm e}^{3 i \left (f x +e \right )}+2400 c^{2} d^{2} {\mathrm e}^{2 i \left (f x +e \right )}+480 c^{3} d +480 c^{2} d^{2}+320 c \,d^{3}+480 c^{4} {\mathrm e}^{6 i \left (f x +e \right )}-210 d^{4} {\mathrm e}^{7 i \left (f x +e \right )}+320 d^{4} {\mathrm e}^{2 i \left (f x +e \right )}+45 d^{4} {\mathrm e}^{i \left (f x +e \right )}+120 c^{4} {\mathrm e}^{8 i \left (f x +e \right )}+480 c^{4} {\mathrm e}^{2 i \left (f x +e \right )}+210 d^{4} {\mathrm e}^{3 i \left (f x +e \right )}+720 c^{4} {\mathrm e}^{4 i \left (f x +e \right )}-45 d^{4} {\mathrm e}^{9 i \left (f x +e \right )}+640 d^{4} {\mathrm e}^{4 i \left (f x +e \right )}\right )}{60 f \left (1+{\mathrm e}^{2 i \left (f x +e \right )}\right )^{5}}+\frac {a \,c^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{f}+\frac {2 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{3} d}{f}+\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c^{2} d^{2}}{f}+\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) c \,d^{3}}{2 f}+\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right ) d^{4}}{8 f}-\frac {a \,c^{4} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{f}-\frac {2 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{3} d}{f}-\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c^{2} d^{2}}{f}-\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) c \,d^{3}}{2 f}-\frac {3 a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) d^{4}}{8 f}\) \(766\)

input
int(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e))^4,x,method=_RETURNVERBOSE 
)
 
output
(4*a*c*d^3+a*d^4)/f*(-(-1/4*sec(f*x+e)^3-3/8*sec(f*x+e))*tan(f*x+e)+3/8*ln 
(sec(f*x+e)+tan(f*x+e)))-(6*a*c^2*d^2+4*a*c*d^3)/f*(-2/3-1/3*sec(f*x+e)^2) 
*tan(f*x+e)+(4*a*c^3*d+6*a*c^2*d^2)/f*(1/2*sec(f*x+e)*tan(f*x+e)+1/2*ln(se 
c(f*x+e)+tan(f*x+e)))+(a*c^4+4*a*c^3*d)/f*tan(f*x+e)+a*c^4/f*ln(sec(f*x+e) 
+tan(f*x+e))-a*d^4/f*(-8/15-1/5*sec(f*x+e)^4-4/15*sec(f*x+e)^2)*tan(f*x+e)
 
3.2.85.5 Fricas [A] (verification not implemented)

Time = 0.28 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.19 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{5} \log \left (\sin \left (f x + e\right ) + 1\right ) - 15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{5} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (24 \, a d^{4} + 8 \, {\left (15 \, a c^{4} + 60 \, a c^{3} d + 60 \, a c^{2} d^{2} + 40 \, a c d^{3} + 8 \, a d^{4}\right )} \cos \left (f x + e\right )^{4} + 15 \, {\left (16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} \cos \left (f x + e\right )^{3} + 16 \, {\left (15 \, a c^{2} d^{2} + 10 \, a c d^{3} + 2 \, a d^{4}\right )} \cos \left (f x + e\right )^{2} + 30 \, {\left (4 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f \cos \left (f x + e\right )^{5}} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e))^4,x, algorithm="fri 
cas")
 
output
1/240*(15*(8*a*c^4 + 16*a*c^3*d + 24*a*c^2*d^2 + 12*a*c*d^3 + 3*a*d^4)*cos 
(f*x + e)^5*log(sin(f*x + e) + 1) - 15*(8*a*c^4 + 16*a*c^3*d + 24*a*c^2*d^ 
2 + 12*a*c*d^3 + 3*a*d^4)*cos(f*x + e)^5*log(-sin(f*x + e) + 1) + 2*(24*a* 
d^4 + 8*(15*a*c^4 + 60*a*c^3*d + 60*a*c^2*d^2 + 40*a*c*d^3 + 8*a*d^4)*cos( 
f*x + e)^4 + 15*(16*a*c^3*d + 24*a*c^2*d^2 + 12*a*c*d^3 + 3*a*d^4)*cos(f*x 
 + e)^3 + 16*(15*a*c^2*d^2 + 10*a*c*d^3 + 2*a*d^4)*cos(f*x + e)^2 + 30*(4* 
a*c*d^3 + a*d^4)*cos(f*x + e))*sin(f*x + e))/(f*cos(f*x + e)^5)
 
3.2.85.6 Sympy [F]

\[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=a \left (\int c^{4} \sec {\left (e + f x \right )}\, dx + \int c^{4} \sec ^{2}{\left (e + f x \right )}\, dx + \int d^{4} \sec ^{5}{\left (e + f x \right )}\, dx + \int d^{4} \sec ^{6}{\left (e + f x \right )}\, dx + \int 4 c d^{3} \sec ^{4}{\left (e + f x \right )}\, dx + \int 4 c d^{3} \sec ^{5}{\left (e + f x \right )}\, dx + \int 6 c^{2} d^{2} \sec ^{3}{\left (e + f x \right )}\, dx + \int 6 c^{2} d^{2} \sec ^{4}{\left (e + f x \right )}\, dx + \int 4 c^{3} d \sec ^{2}{\left (e + f x \right )}\, dx + \int 4 c^{3} d \sec ^{3}{\left (e + f x \right )}\, dx\right ) \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e))**4,x)
 
output
a*(Integral(c**4*sec(e + f*x), x) + Integral(c**4*sec(e + f*x)**2, x) + In 
tegral(d**4*sec(e + f*x)**5, x) + Integral(d**4*sec(e + f*x)**6, x) + Inte 
gral(4*c*d**3*sec(e + f*x)**4, x) + Integral(4*c*d**3*sec(e + f*x)**5, x) 
+ Integral(6*c**2*d**2*sec(e + f*x)**3, x) + Integral(6*c**2*d**2*sec(e + 
f*x)**4, x) + Integral(4*c**3*d*sec(e + f*x)**2, x) + Integral(4*c**3*d*se 
c(e + f*x)**3, x))
 
3.2.85.7 Maxima [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 379, normalized size of antiderivative = 1.61 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {480 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a c^{2} d^{2} + 320 \, {\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a c d^{3} + 16 \, {\left (3 \, \tan \left (f x + e\right )^{5} + 10 \, \tan \left (f x + e\right )^{3} + 15 \, \tan \left (f x + e\right )\right )} a d^{4} - 60 \, a c d^{3} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 15 \, a d^{4} {\left (\frac {2 \, {\left (3 \, \sin \left (f x + e\right )^{3} - 5 \, \sin \left (f x + e\right )\right )}}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1} - 3 \, \log \left (\sin \left (f x + e\right ) + 1\right ) + 3 \, \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 240 \, a c^{3} d {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} - 360 \, a c^{2} d^{2} {\left (\frac {2 \, \sin \left (f x + e\right )}{\sin \left (f x + e\right )^{2} - 1} - \log \left (\sin \left (f x + e\right ) + 1\right ) + \log \left (\sin \left (f x + e\right ) - 1\right )\right )} + 240 \, a c^{4} \log \left (\sec \left (f x + e\right ) + \tan \left (f x + e\right )\right ) + 240 \, a c^{4} \tan \left (f x + e\right ) + 960 \, a c^{3} d \tan \left (f x + e\right )}{240 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e))^4,x, algorithm="max 
ima")
 
output
1/240*(480*(tan(f*x + e)^3 + 3*tan(f*x + e))*a*c^2*d^2 + 320*(tan(f*x + e) 
^3 + 3*tan(f*x + e))*a*c*d^3 + 16*(3*tan(f*x + e)^5 + 10*tan(f*x + e)^3 + 
15*tan(f*x + e))*a*d^4 - 60*a*c*d^3*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e)) 
/(sin(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f*x + e) + 1) + 3*log 
(sin(f*x + e) - 1)) - 15*a*d^4*(2*(3*sin(f*x + e)^3 - 5*sin(f*x + e))/(sin 
(f*x + e)^4 - 2*sin(f*x + e)^2 + 1) - 3*log(sin(f*x + e) + 1) + 3*log(sin( 
f*x + e) - 1)) - 240*a*c^3*d*(2*sin(f*x + e)/(sin(f*x + e)^2 - 1) - log(si 
n(f*x + e) + 1) + log(sin(f*x + e) - 1)) - 360*a*c^2*d^2*(2*sin(f*x + e)/( 
sin(f*x + e)^2 - 1) - log(sin(f*x + e) + 1) + log(sin(f*x + e) - 1)) + 240 
*a*c^4*log(sec(f*x + e) + tan(f*x + e)) + 240*a*c^4*tan(f*x + e) + 960*a*c 
^3*d*tan(f*x + e))/f
 
3.2.85.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 566 vs. \(2 (224) = 448\).

Time = 0.39 (sec) , antiderivative size = 566, normalized size of antiderivative = 2.40 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right ) - 15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right ) - \frac {2 \, {\left (120 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 240 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 360 \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 180 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} + 45 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{9} - 480 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 1440 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 1200 \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 1160 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 130 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} + 720 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2880 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 2400 \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 1600 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 464 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 480 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2400 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 2640 \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 1400 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 190 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 120 \, a c^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 720 \, a c^{3} d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1080 \, a c^{2} d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 780 \, a c d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 195 \, a d^{4} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}^{5}}}{120 \, f} \]

input
integrate(sec(f*x+e)*(a+a*sec(f*x+e))*(c+d*sec(f*x+e))^4,x, algorithm="gia 
c")
 
output
1/120*(15*(8*a*c^4 + 16*a*c^3*d + 24*a*c^2*d^2 + 12*a*c*d^3 + 3*a*d^4)*log 
(abs(tan(1/2*f*x + 1/2*e) + 1)) - 15*(8*a*c^4 + 16*a*c^3*d + 24*a*c^2*d^2 
+ 12*a*c*d^3 + 3*a*d^4)*log(abs(tan(1/2*f*x + 1/2*e) - 1)) - 2*(120*a*c^4* 
tan(1/2*f*x + 1/2*e)^9 + 240*a*c^3*d*tan(1/2*f*x + 1/2*e)^9 + 360*a*c^2*d^ 
2*tan(1/2*f*x + 1/2*e)^9 + 180*a*c*d^3*tan(1/2*f*x + 1/2*e)^9 + 45*a*d^4*t 
an(1/2*f*x + 1/2*e)^9 - 480*a*c^4*tan(1/2*f*x + 1/2*e)^7 - 1440*a*c^3*d*ta 
n(1/2*f*x + 1/2*e)^7 - 1200*a*c^2*d^2*tan(1/2*f*x + 1/2*e)^7 - 1160*a*c*d^ 
3*tan(1/2*f*x + 1/2*e)^7 - 130*a*d^4*tan(1/2*f*x + 1/2*e)^7 + 720*a*c^4*ta 
n(1/2*f*x + 1/2*e)^5 + 2880*a*c^3*d*tan(1/2*f*x + 1/2*e)^5 + 2400*a*c^2*d^ 
2*tan(1/2*f*x + 1/2*e)^5 + 1600*a*c*d^3*tan(1/2*f*x + 1/2*e)^5 + 464*a*d^4 
*tan(1/2*f*x + 1/2*e)^5 - 480*a*c^4*tan(1/2*f*x + 1/2*e)^3 - 2400*a*c^3*d* 
tan(1/2*f*x + 1/2*e)^3 - 2640*a*c^2*d^2*tan(1/2*f*x + 1/2*e)^3 - 1400*a*c* 
d^3*tan(1/2*f*x + 1/2*e)^3 - 190*a*d^4*tan(1/2*f*x + 1/2*e)^3 + 120*a*c^4* 
tan(1/2*f*x + 1/2*e) + 720*a*c^3*d*tan(1/2*f*x + 1/2*e) + 1080*a*c^2*d^2*t 
an(1/2*f*x + 1/2*e) + 780*a*c*d^3*tan(1/2*f*x + 1/2*e) + 195*a*d^4*tan(1/2 
*f*x + 1/2*e))/(tan(1/2*f*x + 1/2*e)^2 - 1)^5)/f
 
3.2.85.9 Mupad [B] (verification not implemented)

Time = 17.12 (sec) , antiderivative size = 361, normalized size of antiderivative = 1.53 \[ \int \sec (e+f x) (a+a \sec (e+f x)) (c+d \sec (e+f x))^4 \, dx=\frac {a\,\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{2\,\left (4\,c^4+8\,c^3\,d+12\,c^2\,d^2+6\,c\,d^3+\frac {3\,d^4}{2}\right )}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{4\,f}-\frac {\left (2\,a\,c^4+4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9+\left (-8\,a\,c^4-24\,a\,c^3\,d-20\,a\,c^2\,d^2-\frac {58\,a\,c\,d^3}{3}-\frac {13\,a\,d^4}{6}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7+\left (12\,a\,c^4+48\,a\,c^3\,d+40\,a\,c^2\,d^2+\frac {80\,a\,c\,d^3}{3}+\frac {116\,a\,d^4}{15}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-8\,a\,c^4-40\,a\,c^3\,d-44\,a\,c^2\,d^2-\frac {70\,a\,c\,d^3}{3}-\frac {19\,a\,d^4}{6}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (2\,a\,c^4+12\,a\,c^3\,d+18\,a\,c^2\,d^2+13\,a\,c\,d^3+\frac {13\,a\,d^4}{4}\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-1\right )} \]

input
int(((a + a/cos(e + f*x))*(c + d/cos(e + f*x))^4)/cos(e + f*x),x)
 
output
(a*atanh((tan(e/2 + (f*x)/2)*(12*c*d^3 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^2 
*d^2))/(2*(6*c*d^3 + 8*c^3*d + 4*c^4 + (3*d^4)/2 + 12*c^2*d^2)))*(12*c*d^3 
 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^2*d^2))/(4*f) - (tan(e/2 + (f*x)/2)^9*( 
2*a*c^4 + (3*a*d^4)/4 + 6*a*c^2*d^2 + 3*a*c*d^3 + 4*a*c^3*d) - tan(e/2 + ( 
f*x)/2)^7*(8*a*c^4 + (13*a*d^4)/6 + 20*a*c^2*d^2 + (58*a*c*d^3)/3 + 24*a*c 
^3*d) - tan(e/2 + (f*x)/2)^3*(8*a*c^4 + (19*a*d^4)/6 + 44*a*c^2*d^2 + (70* 
a*c*d^3)/3 + 40*a*c^3*d) + tan(e/2 + (f*x)/2)^5*(12*a*c^4 + (116*a*d^4)/15 
 + 40*a*c^2*d^2 + (80*a*c*d^3)/3 + 48*a*c^3*d) + tan(e/2 + (f*x)/2)*(2*a*c 
^4 + (13*a*d^4)/4 + 18*a*c^2*d^2 + 13*a*c*d^3 + 12*a*c^3*d))/(f*(5*tan(e/2 
 + (f*x)/2)^2 - 10*tan(e/2 + (f*x)/2)^4 + 10*tan(e/2 + (f*x)/2)^6 - 5*tan( 
e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 - 1))